/*
 * 
 * 
 */
package de.hpi.generator.generator;

/**
 * starting configuration arguments
 * @author Michael Wolowyk
 */
public class StartArgs {

    /**
     * ordinary_config(CSGenerator) vs. integrated_config(Tesma)
     */
    private String aGenerationMode = null;

    public String getGenerationMode() {
        return aGenerationMode;
    }
    /**
     * configuration path
     */
    private String aConfigPath = null;

    public String getConfigPath() {
        return aConfigPath;
    }
    /**
     * output path
     */
    private String aOutputPath = null;

    public String getOutputPath() {
        return aOutputPath;
    }

    public StartArgs(String[] args) throws Exception {
        validate(args);
        int paramIndex = 0;
        aGenerationMode = args[paramIndex++];
        aConfigPath = args[paramIndex++];
        aOutputPath = args[paramIndex++];
    }

    private void validate(String[] args) throws Exception {
        if (args.length != 3) {
            throw new WrongParamsException("The number of given params is wrong");
        }
    }
    
    public boolean isIntegratedMode(){
        return (aGenerationMode.compareTo("integrated_config") == 0);
    }
}
